import {Component} from "react";
import {abstractSvc} from "../../serverConfig/serverManager";
import {Image, View} from "@tarojs/components";
import './commentComponent.less'

export default class CommentComponent extends Component {
  constructor(props) {
    super(props);
  }

  componentDidMount() {
  }

  componentWillUnmount() {
  }

  componentDidShow() {
  }

  componentDidHide() {
  }

  state={

  }

  render() {
    return (
      <View className={'commentBox'}>
        <View className={'commentHeader'}>
          <Image className={'commentIcon'}
                 src={this.props.icon}/>
          <View className={'commentHeaderInner'}>
            <View className={'commentUser'}>{this.props.username}</View>
            <View className={'commentTime'}>{this.props.time}</View>
          </View>
        </View>
        <View className={'commentBody'}>
          {this.props.comment}
        </View>
      </View>
    )
  }

}
